home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
MEM_UTL
/
VMMNGR
/
EXVMQUEU.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1990-07-16
|
952b
|
47 lines
program exvmqueu;
Uses
OpRoot,
Vmmngr;
var
ExQueue : VmmStaticQueue;
i, j : Word;
begin
if not ExQueue.Init(11, Sizeof(Word), True) then begin
Writeln('Failed to create VmmStaticQueue, Status = ', InitStatus);
Halt;
end;
for i := 1 to 10 do begin
Write('Pushing ', i, '... ');
ExQueue.PushTail(i);
end;
Writeln;
Writeln('Removing value 6...');
i := 6;
ExQueue.Remove(i);
for i := 1 to 7 do begin
ExQueue.PopHead(j);
Write('Popping ', j, '... ');
end;
Writeln;
for i := 11 to 25 do begin
Write('Pushing ', i, '... ');
ExQueue.PushTail(i);
end;
Writeln;
Writeln('Removing value 13...');
i := 13;
ExQueue.Remove(i);
Writeln('Now popping remaining elements...');
repeat
ExQueue.PopHead(j);
i :=ExQueue.GetStatus;
if i = 0 then
Writeln('Popping ', j, '... ');
until i <> 0;
Writeln;
ExQueue.Done;
end.